function(eth_apply TARGET REQUIRED)
	if (BUILD_GM)
		set(OPENSSL_INCLUDE_DIRS ${TASSL_INCLUDE_DIRS})
		target_include_directories(${TARGET} SYSTEM PUBLIC ${TASSL_INCLUDE_DIRS})
		target_link_libraries(${TARGET} PUBLIC ${TASSL_LIBRARIES})
		set_property(TARGET ${TARGET} PROPERTY INTERFACE_LINK_LIBRARIES ${TASSL_LIBRARIES})
	else()
		if (APPLE)
			set(OPENSSL_ROOT_DIR /usr/local/opt/openssl)
			if(NOT TESTS)
				set(OPENSSL_USE_STATIC_LIBS TRUE)
			endif()
		endif()
		find_package (OpenSSL QUIET REQUIRED)
		set(OPENSSL_INCLUDE_DIRS ${OPENSSL_INCLUDE_DIR})
		eth_show_dependency(OPENSSL OpenSSL)
		if (OPENSSL_FOUND)
			target_include_directories(${TARGET} SYSTEM PUBLIC ${OPENSSL_INCLUDE_DIRS})
			target_link_libraries(${TARGET} PUBLIC ${OPENSSL_LIBRARIES} dl)
		elseif (NOT ${REQUIRED} STREQUAL "OPTIONAL")
			message(FATAL_ERROR "OpenSSL library not found")
		endif()
	endif()
endfunction()
